<form action="<?=base_url()?>users/search" method="post">
	Username:<input type="text" name="username" value="<?=$record['username']?>"> 
	First Name :<input type="text" name="firstname" value="<?=$record['firstname']?>"> 
	Middle Name:<input type="text" name="middlename" value="<?=$record['middlename']?>"> 
	Last Name:<input type="text" name="lastname" value="<?=$record['lastname']?>"> 
	<input type="submit" name="submit" value="Submit"> 
</form>
<table>
	<tr>
		<th>Username</th>
		<th>Firstname</th>
		<th>Middlename</th>
		<th>Lastname</th>
	</tr>
<?php forEach($records as $rec){ ?>
	<tr>
		<td><?= $rec['username']?></td>
		<td><?= $rec['firstname']?></td>
		<td><?= $rec['middlename']?></td>
		<td><?= $rec['lastname']?></td>
		<td><a href="<?=base_url()?>users/edit/<?=$rec['id']?>">edit</a> | <a href="<?=base_url()?>users/delete/<?= $rec['id']?>">delete</a></td>
	</tr>
<?php }?>
</table>